/* USER CODE BEGIN Header */
/**
 ******************************************************************************
 * @file           : main.h
 * @brief          : Header for main.c file.
 *                   This file contains the common defines of the application.
 ******************************************************************************
 * @attention
 *
 * Copyright (c) 2023 STMicroelectronics.
 * All rights reserved.
 *
 * This software is licensed under terms that can be found in the LICENSE file
 * in the root directory of this software component.
 * If no LICENSE file comes with this software, it is provided AS-IS.
 *
 ******************************************************************************
 */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32f4xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define LED1_Pin                 GPIO_PIN_2
#define LED1_GPIO_Port           GPIOE
#define LED2_Pin                 GPIO_PIN_3
#define LED2_GPIO_Port           GPIOE
#define CURRENT1_RESET_Pin       GPIO_PIN_4
#define CURRENT1_RESET_GPIO_Port GPIOE
#define CURRENT1_OCP_Pin         GPIO_PIN_5
#define CURRENT1_OCP_GPIO_Port   GPIOE
#define USART2_DE_Pin            GPIO_PIN_6
#define USART2_DE_GPIO_Port      GPIOE
#define U2_UT_M_Pin              GPIO_PIN_13
#define U2_UT_M_GPIO_Port        GPIOC
#define CURRENT2_OVP_Pin         GPIO_PIN_0
#define CURRENT2_OVP_GPIO_Port   GPIOC
#define LD2_ON_Pin               GPIO_PIN_1
#define LD2_ON_GPIO_Port         GPIOC
#define LD2_EN_Pin               GPIO_PIN_2
#define LD2_EN_GPIO_Port         GPIOC
#define CURRENT2_MOSI_Pin        GPIO_PIN_3
#define CURRENT2_MOSI_GPIO_Port  GPIOC
#define CURRENT1_DRDY_Pin        GPIO_PIN_0
#define CURRENT1_DRDY_GPIO_Port  GPIOA
#define TADC_MOSI_M_Pin          GPIO_PIN_1
#define TADC_MOSI_M_GPIO_Port    GPIOA
#define UART_TXD_Pin             GPIO_PIN_2
#define UART_TXD_GPIO_Port       GPIOA
#define UART_RDX_Pin             GPIO_PIN_3
#define UART_RDX_GPIO_Port       GPIOA
#define CURRENT1_NSS_Pin         GPIO_PIN_4
#define CURRENT1_NSS_GPIO_Port   GPIOA
#define CURRENT1_SCK_Pin         GPIO_PIN_5
#define CURRENT1_SCK_GPIO_Port   GPIOA
#define CURRENT1_OVP_Pin         GPIO_PIN_6
#define CURRENT1_OVP_GPIO_Port   GPIOA
#define CURRENT1_MOSI_Pin        GPIO_PIN_7
#define CURRENT1_MOSI_GPIO_Port  GPIOA
#define LD1_EN_Pin               GPIO_PIN_4
#define LD1_EN_GPIO_Port         GPIOC
#define LD1_ON_Pin               GPIO_PIN_5
#define LD1_ON_GPIO_Port         GPIOC
#define DQ_Pin                   GPIO_PIN_0
#define DQ_GPIO_Port             GPIOB
#define CPTART_Pin               GPIO_PIN_8
#define CPTART_GPIO_Port         GPIOE
#define CPSTART1_Pin             GPIO_PIN_9
#define CPSTART1_GPIO_Port       GPIOE
#define TDAC2_NSS_M_Pin          GPIO_PIN_11
#define TDAC2_NSS_M_GPIO_Port    GPIOE
#define TDAC2_SCK_M_Pin          GPIO_PIN_12
#define TDAC2_SCK_M_GPIO_Port    GPIOE
#define TDAC2_MOSI_M_Pin         GPIO_PIN_14
#define TDAC2_MOSI_M_GPIO_Port   GPIOE
#define CURRENT2_SCL_Pin         GPIO_PIN_10
#define CURRENT2_SCL_GPIO_Port   GPIOB
#define TADC_NSS_M_Pin           GPIO_PIN_12
#define TADC_NSS_M_GPIO_Port     GPIOB
#define TADC_SCK_M_Pin           GPIO_PIN_13
#define TADC_SCK_M_GPIO_Port     GPIOB
#define U2_OT_M_Pin              GPIO_PIN_15
#define U2_OT_M_GPIO_Port        GPIOB
#define TX3_Pin                  GPIO_PIN_8
#define TX3_GPIO_Port            GPIOD
#define RX3_Pin                  GPIO_PIN_9
#define RX3_GPIO_Port            GPIOD
#define U1_UT_M_Pin              GPIO_PIN_11
#define U1_UT_M_GPIO_Port        GPIOD
#define CURRENT2_OCP_Pin         GPIO_PIN_15
#define CURRENT2_OCP_GPIO_Port   GPIOD
#define U1_SHDN_M_Pin            GPIO_PIN_6
#define U1_SHDN_M_GPIO_Port      GPIOC
#define CURRENT2_SCK_Pin         GPIO_PIN_7
#define CURRENT2_SCK_GPIO_Port   GPIOC
#define EEPROM_WP_Pin            GPIO_PIN_8
#define EEPROM_WP_GPIO_Port      GPIOC
#define TX1_Pin                  GPIO_PIN_9
#define TX1_GPIO_Port            GPIOA
#define RX1_Pin                  GPIO_PIN_10
#define RX1_GPIO_Port            GPIOA
#define TADC_MISO_M_Pin          GPIO_PIN_11
#define TADC_MISO_M_GPIO_Port    GPIOA
#define TDAC1_NSS_M_Pin          GPIO_PIN_15
#define TDAC1_NSS_M_GPIO_Port    GPIOA
#define TDAC1_SCK_M_Pin          GPIO_PIN_10
#define TDAC1_SCK_M_GPIO_Port    GPIOC
#define U2_SHDN_M_Pin            GPIO_PIN_11
#define U2_SHDN_M_GPIO_Port      GPIOC
#define TDAC1_MOSI_M_Pin         GPIO_PIN_12
#define TDAC1_MOSI_M_GPIO_Port   GPIOC
#define CURRENT2_DRDY_Pin        GPIO_PIN_2
#define CURRENT2_DRDY_GPIO_Port  GPIOD
#define CURRENT2_SDA_Pin         GPIO_PIN_3
#define CURRENT2_SDA_GPIO_Port   GPIOB
#define JTRST_Pin                GPIO_PIN_4
#define JTRST_GPIO_Port          GPIOB
#define CURRENT2_RESET_Pin       GPIO_PIN_5
#define CURRENT2_RESET_GPIO_Port GPIOB
#define U1_OT_M_Pin              GPIO_PIN_6
#define U1_OT_M_GPIO_Port        GPIOB
#define CURRENT1_SDA_Pin         GPIO_PIN_7
#define CURRENT1_SDA_GPIO_Port   GPIOB
#define CURRENT1_SCL_Pin         GPIO_PIN_8
#define CURRENT1_SCL_GPIO_Port   GPIOB
#define CURRENT2_NSS_Pin         GPIO_PIN_9
#define CURRENT2_NSS_GPIO_Port   GPIOB
#define WORKING_MODE_Pin         GPIO_PIN_6
#define WORKING_MODE_GPIO_Port   GPIOD

/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
